package cn.stylefeng.guns.modular.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
    * 设备信息表，需要同步给IOT redis
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "app_device")
public class Device extends BaseEntity {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 厂家编号、品牌编号，方便搜索
     */
    @TableField(value = "device_brand_id")
    private Integer deviceBrandId;

    /**
     * 设备品牌。如海康、新驰、宇叶
     */
    @TableField(value = "device_brand")
    private String deviceBrand;

    /**
     * 厂家出厂的设备序列号
     */
    @TableField(value = "device_sn")
    private String deviceSn;

    /**
     * 设备类型，1是塔吊、2是升降机、3是吊钩可视化、4是AI服务器、5是监控摄像头，6是用电监测设备
     */
    @TableField(value = "device_type")
    private Integer deviceType;

    /**
     * 最后在线时间
     */
    @TableField(value = "device_last_time")
    private Integer deviceLastTime;

    /**
     * 0是未启用，1是启用
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 备注
     */
    @TableField(value = "remarks")
    private String remarks;

    /**
     * 入库时间
     */
    @TableField(value = "create_time")
    private Integer createTime;

    /**
     * 最后更新时间
     */
    @TableField(value = "last_time")
    private Date lastTime;

    public static final String COL_ID = "id";

    public static final String COL_DEVICE_BRAND_ID = "device_brand_id";

    public static final String COL_DEVICE_BRAND = "device_brand";

    public static final String COL_DEVICE_SN = "device_sn";

    public static final String COL_DEVICE_TYPE = "device_type";

    public static final String COL_DEVICE_LAST_TIME = "device_last_time";

    public static final String COL_STATUS = "status";

    public static final String COL_REMARKS = "remarks";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_LAST_TIME = "last_time";
}